package com.wjzjq.hiring.company.entity;

import java.util.Date;

public class ApplicationEntity {
	// id int 10 0 0 -1 -1 0 0 0 -1 0
	// position_id int 10 0 0 0 -1 0 0 0 0 0
	// talent_id int 10 0 0 0 -1 0 0 0 0 0
	// resume_id int 10 0 0 0 -1 0 0 0 0 0
	// status int 11 0 0 0 0 0 0 0 0 0
	// app_time datetime 0 0 0 0 0 0 0 0 0 0
	// handle_time datetime 0 0 -1 0 0 0 0 0 0 0

	private int id;
	private int positionId;
	private int talentId;
	private int resumeId;
	private int status;
	private Date appTime;
	private Date handleTime;
	// 扩展
	private String positionName;
	private String companyName;
	private String resumeIntention;
	private String talentName;
	private int companyId;
	// 为了检索时间的扩展
	private String startTime;
	private String endTime;

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public int getCompanyId() {
		return companyId;
	}

	public void setCompanyId(int companyId) {
		this.companyId = companyId;
	}

	public String getResumeIntention() {
		return resumeIntention;
	}

	public void setResumeIntention(String resumeIntention) {
		this.resumeIntention = resumeIntention;
	}

	public String getTalentName() {
		return talentName;
	}

	public void setTalentName(String talentName) {
		this.talentName = talentName;
	}

	public String getPositionName() {
		return positionName;
	}

	public void setPositionName(String positionName) {
		this.positionName = positionName;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getPositionId() {
		return positionId;
	}

	public void setPositionId(int positionId) {
		this.positionId = positionId;
	}

	public int getTalentId() {
		return talentId;
	}

	public void setTalentId(int talentId) {
		this.talentId = talentId;
	}

	public int getResumeId() {
		return resumeId;
	}

	public void setResumeId(int resumeId) {
		this.resumeId = resumeId;
	}

	public int getStatus() {
		return status;
	}

	public String getStatusStr() {
		if (status == 1) {
			return "待审核";
		} else if (status == 2) {
			return "审核通过";
		} else if (status == 3) {
			return "已拒绝";
		} else {
			return "Unknow";
		}
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getAppTime() {
		return appTime.toString().substring(0, appTime.toString().length() - 2);
	}

	public void setAppTime(Date appTime) {
		this.appTime = appTime;
	}

	public Date getHandleTime() {
		return handleTime;
	}

	public void setHandleTime(Date handleTime) {
		this.handleTime = handleTime;
	}

}